/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.ensisa.sunspot.event;

/**
 *
 * @author michel
 */
public class IntegerEvent extends AbstractEvent {

    private int intensity;

    public IntegerEvent (int major, int minor) {
        super (major, minor);
    }

    public int getIntensity () {
        return intensity;
    }

    public void setIntensity (int intensity) {
        this.intensity = intensity;
    }

    public String toString () {
        StringBuffer tmp = new StringBuffer ();
        tmp.append (super.toString());
        tmp.append(" ");
        tmp.append(intensity);
        return tmp.toString();
    }

    public IEvent clone() {
        IntegerEvent copy = new IntegerEvent (getMajor(), getMinor());
        copy.setState(getState());
        copy.setTimeStamp(getTimeStamp());
        copy.setIntensity(getIntensity());
        return copy;
    }

}
